package sort;

import java.util.Arrays;
import java.util.Random;

public class Test02 {
    public static void main(String[] args) {
        Random random = new Random();
        int []arr = new int[100000];
        for (int i = 0; i < arr.length; i++) {
            arr[i] = random.nextInt();
        }
        long start = System.currentTimeMillis();
        for(int i = 0; i < arr.length - 1; i++){
            for (int j = i + 1; j < arr.length; j++){
                if(arr[i] > arr[j]){
                    int temp = arr[i];
                    arr[i] = arr[j];
                    arr[j] = temp;
                }
            }
        }
        long end = System.currentTimeMillis();
        System.out.println(end-start);//11267
        //System.out.println(Arrays.toString(arr));
    }
}
